const express = require('express');
const proxy = require('http-proxy-middleware');
const path = require('path');
const app = express();

app.use('/', express.static(path.resolve('./html')));

const proxymiddleware1 = proxy("/api", {
    target: 'http://localhost:8050/',
    secure: false,
    changeOrigin: true,
    prependPath: true,
    ignorePath: false
});

app.use(proxymiddleware1);

app.listen(8989,function () {
    console.log('已经监听8989端口')
});
